import 'package:flutter/material.dart';
import 'package:flutter_ble_demo/ble_send_receive.dart';
import 'package:flutter_ble_demo/bluetooth_ble_test.dart';
import 'package:flutter_comm_base_framework/core/utils/CupertinoLocalizationsDelegate.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      localizationsDelegates: [
        CupertinoLocalizationsDelegate(),
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
      ],
      supportedLocales: [
        const Locale('zh', 'CN'),
        const Locale('en', 'US'),
      ],
      title: "",
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
        buttonTheme: new ButtonThemeData(
            minWidth: 0,
            height: 0,
            padding: EdgeInsets.all(0),
            buttonColor: Colors.transparent),
      ),
      home: BluetoothBleTestPage(),
      routes: {
        '/sendAndReceive': (BuildContext context) => BleSendReceivePage(),
      },
    );
  }
}
